import VueRouter from "vue-router";
import Vue from "vue";
Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        redirect: '/welcome'
    },{
        path: '/welcome',
        name: 'Welcome',
        meta: { show: true },
        component: () => import('@/pages/welcome'),
    },{
        path: '/home',
        name: 'Home',
        component: () => import('@/pages/home/index.vue')
    },{
        path: '/book',
        name: 'Book',
        component: () => import('@/pages/book'),
    },{
        path: '/shoppingCart',
        name: 'ShoppingCart',
        component: () => import('@/pages/shoppingCart'),
    },{
        path: '/user',
        name: 'User',
        component: () => import('../pages/user')
    }
];  // 修复数组闭合括号

const router = new VueRouter({
    routes
});

export default router;